#pragma once
#include<stdio.h>
#include<string.h>
#include<assert.h>
#include<stdbool.h>

typedef int HeapType;

typedef struct Heap
{
	HeapType* a;
	int size;
	int capacity;
}HP;

void HaepInit(HP* php);

void HeapPush(HP* php, HeapType x);

void HeapDestory(HP* php);

void HeapPop(HP* php);

HeapType HeapTop(HP* php);

int HeapSize(HP* php);

bool HeapEmpty(HP* php);

void HeapSort(int* a, int n);